import request from "@/utils/request";

//新增接口
export const addOrder = (data) => {
  return request({
    url: "produce/order",
    method: "post",
    data,
  });
};
//编辑接口
export const updateOrder = (data) => {
  return request({
    url: "prod/order",
    method: "put",
    data,
  });
};
//查询接口
export const listOrder = (params) => {
  return request({
    url: "prod/order/list",
    method: "get",
    params,
  });
};
//删除接口
export const delOrder = (ids) => {
  return request({
    url: `prod/order/${ids}`,
    method: "delete",
  });
};
//数据回显接口
export const getOrder = (id) => {
  return request({
    url: `prod/order/${id}`,
    method: "get",
  });
};

// 同步ERP数据
export function syncERPOrderList(params) {
  return request({
    url: "prod/order/syncERPOrderList",
    method: "get",
    params,
  });
}
